<template>
  <div>
    <h2>Home</h2>
    <button @click="$router.push({path: '/home/news'})">查看News</button>
    <button @click="$router.push({name: 'about'})">查看About</button>
    <ul class="nav nav-tabs">
      <li>
        <router-link to="/home/news">News</router-link>
      </li>
      <li>
        <router-link to="/home/message">Message</router-link>
      </li>
    </ul>
    <!-- 在此显示当前子路由组件 -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'Home',
}
</script>

<style scoped>

</style>
